package data.handle;

public class PartHandle {
    private int partKeyNum;
    private byte brandIndexs[];

    public PartHandle(int partKeyNum){
        this.partKeyNum = partKeyNum;
        this.brandIndexs = new byte[partKeyNum];
    }

    public void putBrandIndex(int partKey, byte brandIndex){
        int hash = partKey % partKeyNum;
        brandIndexs[hash] = brandIndex;
    }

    public byte getBrandIndex(int partKey){
        int hash = partKey % partKeyNum;
        return brandIndexs[hash];
    }
}
